package lesson3.slides.io;

import java.io.*;

public class StandardIn {

    public static void main(String[] args) {
        // Create the Reader and BufferedReader
        Reader r = new InputStreamReader(System.in);
        BufferedReader input = new BufferedReader(r);
        try {
            while (true) {
                System.out.print("Enter a line ('end' terminates):");
                String s = input.readLine();
                if (s.equals("end")) {
                    break;
                }
                System.out.println("You said -- " + s);
            }
            System.out.println("bye");
        } catch (Exception e) {
            System.err.println(e);
        }
    }
}
